package com.wss.email.rest;


import com.wss.common.model.Result;
import com.wss.common.utils.EmailUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("email")
public class EmailController {

    @GetMapping("send")
    public Result  sendEmail(@RequestParam("email")String email,@RequestParam("code") String code){
        EmailUtil.sendMail(email,"注册验证码！",code);
        return Result.success();
    }
}
